package week8;

public class Student {
   private String name;
   private  Transport transport;



   public Student(String name,Transport transport){
      this.name = name;
      this.transport = transport;
   }
   public Student() {
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public Transport getTransport() {
      return transport;
   }

   public void setTransport(Transport transport) {
      this.transport = transport;
   }


   public void show(){
      System.out.println(name+"上学交通工具的信息");
      transport.showInfo();
   }

















}
